how to find curve of intersection